//package com.hound.config;
//
//import com.alibaba.druid.pool.DruidDataSource;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.annotation.Primary;
//import org.springframework.core.convert.ConversionService;
//
//import javax.sql.DataSource;
//
///**
// * Created by lupeng on 2018/3/31.
// */
//@Configuration
//public class DataSourceConfig {
//
//    @Value("${druid.driver}")
//    private String driver;
//    @Value("${druid.url}")
//    private String url;
//    @Value("${druid.userName}")
//    private String userName;
//    @Value("${druid.password}")
//    private String password;
////    ConversionService
//
//
//    @Bean(name = "dataSource") //声明为bean实例
//    @Primary //原发性，同样的DataSource中使用被注解的
//    public DataSource dataSource(){
//        DruidDataSource dataSource = new DruidDataSource();
//        dataSource.setDriverClassName(driver);
//        dataSource.setUrl(url);
//        dataSource.setUsername(userName);
//        dataSource.setPassword(password);
//        dataSource.setInitialSize(3);
//        return dataSource;
//    }
//
//}
